<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="${pageContext.request.contextPath }" />
		
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="/WEB-INF/pages/qtop.jsp" flush="true"></jsp:include>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>在线问答系统</title>
</head>
<body style="background-color: white;">
		
		<div class="container" style="padding: 10px 0px 20px 100px">           
		      <c:forEach items="${searchs}" var="search" varStatus="st">
				<div style="padding: 10px 0px 20px 200px">
					<div>
							<c:if test="${search.qDostate eq 2}">
								<button type="button" disabled="disabled" class="btn btn-success">解决</button>
							</c:if>
							<a href="${path}/ques/answerques/${search.qId}" style="font-size: 30px;font-weight: bold; color: green">${search.qTitle}</a>
					</div>
					<div>
						<textarea class="form-control" style="border:0; background-color: white;resize: none; outline: none;"   readonly="readonly">${search.qBody}</textarea>
					</div>
				</div>
			  </c:forEach>
		</div>
	<script type="text/javascript">
	function search(){
		$.ajax({
			cache : true,
			type : "POST",
			url : "<c:url value='/ques/search'/>",
			data : {"qTitle":$('#qTitle').val()},
			error : function(
					request) {
			},
			success : function(
					data) {
				if(data==0){
					window.location.href = window.location.href;
				}
			}
		});
	}
	</script>
</body>
</html>